package com.j2eefast.web.job.task;

import com.j2eefast.web.service.ClassifyService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component("jobInitClassify")
public class JobInitClassify {

    private Logger LOGGER = LoggerFactory.getLogger(JobInitClassify.class);


    @Autowired
    private ClassifyService classifyService;



    public void initClassify(){
        LOGGER.info("开始初始化分类数据");
        Long startTime = System.currentTimeMillis();
        classifyService.initClassify();
        LOGGER.info("初始化分类结束，共计耗时{}秒。" , (System.currentTimeMillis() - startTime) / 1000);

    }
}
